<template>
	<view>
		<uni-popup ref="popup" type="dialog">
			<uni-popup-dialog 
				type="success" 
				mode="base" 
				title="" 
				:content="content"
				:before-close="true" 
				:leftBtnText="leftBtnText"
				:rightBtnText="rightBtnText"
				@close="close" 
				@confirm="confirm">
			</uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		props:{
			leftBtnText: String,
			rightBtnText: String,
			content: String,
		},
		data() {
			return {

			};
		},
		methods:{
			openPopup(){
				this.$refs.popup.open()
			},
			close(done){
				this.$emit('close',()=> done())
				done()
			},
			confirm(done,value){
				this.$emit('confirm',()=> done(),value)
			},
		}
	}
</script>

<style scoped lang="scss">
	/deep/ .uni-popup-dialog {
		padding-bottom: 30upx;
		.uni-dialog-content {
			padding: 5px 30px 15px 30px;
		}

		.uni-dialog-button-group {
			padding: 30upx 68upx;
			border: none;

			.uni-dialog-button {
				height: 100%;
				border: 1upx solid #FE5E49;
				border-radius: 50upx;
			}

			.uni-border-left {
				background: #FE5E49;
				margin-left: 44upx;
			}

			.uni-dialog-button-text {
				padding: 21upx 0upx;
				font-size: 30upx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #FE5E49;
			}

			.uni-button-color {
				color: #FFFFFF;
			}
		}
	}
</style>
